package com.huangmb.anymark.app.utils;

import android.graphics.Color;
import com.huangmb.anymark.app.model.UserMarker;

import java.util.HashMap;
import java.util.Map;

/**
 * @author hmb
 * @version 1.0
 * @since 2016/4/27 14:24
 */
public class MarkerUtils {
    private static Map<Integer,Integer> iconMap = new HashMap<>();
    private static final int DEFAULT_COLOR = Color.BLUE;
    static {
        iconMap.put(1,Color.CYAN);
        iconMap.put(2,Color.GREEN);
        iconMap.put(3,Color.YELLOW);
        iconMap.put(4,Color.CYAN);
        iconMap.put(5,Color.BLUE);
    }
    public static int getMappingColor(UserMarker marker){
        Integer color = iconMap.get(marker.getCategory().getId());
        return color == null ? DEFAULT_COLOR : color;
    }
}
